<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCluesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('clues', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('account_id')->nullable()->index();
            $table->string('type')->nullable()->index();
            $table->string('clue_id')->nullable()->index();
            $table->string('adv_id')->nullable();
            $table->string('ad_plan_id')->nullable();
            $table->string('ad_plan_name')->nullable();
            $table->string('site_id')->nullable();
            $table->string('clue_type')->nullable();
            $table->string('module_id')->nullable();
            $table->dateTime('create_time')->nullable();
            $table->string('clue_source')->nullable();
            $table->string('gender')->nullable();
            $table->float('age')->nullable();
            $table->json('remark_dict')->nullable();
            $table->string('external_url')->nullable();
            $table->string('module_name')->nullable();
            $table->string('name')->nullable();
            $table->string('email')->nullable();
            $table->string('weixin')->nullable();
            $table->string('qq')->nullable();
            $table->string('province_name')->nullable();
            $table->string('city_name')->nullable();
            $table->string('address')->nullable();
            $table->string('remark')->nullable();
            $table->string('form_remark')->nullable();
            $table->string('appname')->nullable();
            $table->string('convert_status')->nullable();
            $table->string('telphone')->nullable();

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('clues');
    }
}
